const db = wx.cloud.database()
const app = getApp();
Page({
  data: {
    
  },
  onLoad(option) {
    
  },

  async getuserinfo(e) {
    if (e.detail.errMsg == "getUserInfo:ok") {
      console.log('获得授权成功')
      app.globalData.userInfo = e.detail.userInfo;
      wx.setStorageSync('wxuserinfo', e.detail.userInfo)
      //console.log(e.detail.userInfo)
      //this.triggerEvent('topub', 'helloworld')
      wx.navigateBack();
    } else {
      console.log('获得授权失败')
    }
  }
   
})